<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
     <div class="con">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div class="del">4</div>
     </div>
</body>
</html>
<script>
    let parent = document.querySelector(".con");
    let child = document.querySelector(".del");
    let element = parent.removeChild(child);
    console.log(element)
</script>